
    <?php $this->load->view('datan/chart_header');?>
    <link href="<?php echo URLPRE;?>static/admin/css/admin_full.css" rel="stylesheet" />
    <link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
    <script src="../public/Lib/echarts-2.2.7/build/dist/echarts-all.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/Kalendajs/build/kalendae.standalone.js"></script>
    <link href="<?php echo URLPRE;?>static/public/Lib/Kalendajs/build/kalendae.css" rel="stylesheet" />
    <style>
        .input{ height: 27px;}
    </style>
    <div class="nav">
        <ul>
            <li class="current"><a  href="javascript:void(0)">出行目的地分析</a></li>
        </ul>
    </div>

    <form method="post" action="<?php echo $index_url;?>">
    <div class="table_list" id="content">


    <table width="100%"  >
        <tbody>
            <tr>
                <td align="right">
                    <input type="text" value="<?php echo $condition['startdate']?>" placeholder="开始日期" class="input rounded" name="start_date" id="Kalendae1" />~
                    <input type="text" value="<?php echo $condition['enddate']?>" placeholder="结束日期" class="input rounded" name="end_date" id="Kalendae2" /> &nbsp;&nbsp;
                    <input type="submit" class="btn" value="搜索"></td>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
        <div class="main" id="main1" style="height:<?php echo $_GET['height'] ? intval($_GET['height']) : 400?>px;"></div>


        <div class="main" id="main2" style="height:<?php echo $_GET['height'] ? intval($_GET['height']) : 400?>px;"></div>





    <?php $this->load->view('datan/chart_footer');?>
    <script type="text/javascript">
        var kal_dae1 = new Kalendae.Input('Kalendae1', {
            months:1,
            mode:'single',
            format:'YYYY-MM-DD'
        });
        var kal_dae2 = new Kalendae.Input('Kalendae2', {
            months:1,
            mode:'single',
            format:'YYYY-MM-DD'
        });
        var myChart = echarts.init(document.getElementById('main1'));
        var myChart2 = echarts.init(document.getElementById('main2'));

        var option = {
            <?php if(!$_GET['ifr']){?>
            dataZoom : {
                show : true,
                realtime : true,
                //orient: 'vertical',   // 'horizontal'
                //x: 0,
//            y: 36,
                //width: 400,
                height: 20,
                backgroundColor: 'rgba(221,160,221,0.5)',
                dataBackgroundColor: 'rgba(138,43,226,0.5)',
                fillerColor: 'rgba(38,143,26,0.6)',
                handleColor: 'rgba(128,43,16,0.8)',
                //xAxisIndex:[],
                //yAxisIndex:[],
                start : 0,
                end : 100
            },
            <?php }?>
            title : {
                text: '目的地排行-按省份汇总'
            },
            theme:'infographic',
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            legend: {
                data:['目的地省份订单汇总']
            },
            toolbox: {
                show : true,
                orient: 'vertical',
                x: 'right',
                y: 'center',
                feature : {
                    mark : {show: true},
                    dataView : {show: true, readOnly: false},
                    magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                    restore : {show: true},
                    saveAsImage : {show: true}
                }
            },
            calculable : true,
            xAxis : [
                {
                    type : 'category',
                    name : '目的地',
                    data : ['<?php echo implode('\',\'', $x_list_1)?>']
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    name : '总量',
                    axisLabel : {
                        formatter: '{value} '
                    }
                }
            ],
            series : [
                {
                    name:'订单数量',
                    type:'bar',
                    stack: '搜索引擎',
                    data:[<?php echo implode(',', $y_list_1)?>]
                }
            ]
        };

        var option2 = {
            <?php if(!$_GET['ifr']){?>
            dataZoom : {
                show : true,
                realtime : true,
                //orient: 'vertical',   // 'horizontal'
                //x: 0,
//            y: 36,
                //width: 400,
                height: 20,
                backgroundColor: 'rgba(221,160,221,0.5)',
                dataBackgroundColor: 'rgba(138,43,226,0.5)',
                fillerColor: 'rgba(38,143,26,0.6)',
                handleColor: 'rgba(128,43,16,0.8)',
                //xAxisIndex:[],
                //yAxisIndex:[],
                start : 0,
                end : 100
            },
            <?php }?>
            title : {
                text: '目的地排行-按城市汇总'
            },
            theme:'infographic',
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            legend: {
                data:['目的地城市订单汇总']
            },
            toolbox: {
                show : true,
                orient: 'vertical',
                x: 'right',
                y: 'center',
                feature : {
                    mark : {show: true},
                    dataView : {show: true, readOnly: false},
                    magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                    restore : {show: true},
                    saveAsImage : {show: true}
                }
            },
            calculable : true,
            xAxis : [
                {
                    type : 'category',
                    name : '目的地',
                    data : ['<?php echo implode('\',\'', $x_list_2)?>']
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    name : '总量',
                    axisLabel : {
                        formatter: '{value} '
                    }
                }
            ],
            series : [
                {
                    name:'订单数量',
                    type:'bar',
                    stack: '搜索引擎',
                    data:[<?php echo implode(',', $y_list_2)?>]
                }
            ]
        };

        myChart.setOption(option);
        myChart2.setOption(option2);
    </script>
